package com.bxait.toymail.order.feign;

import com.bxait.com.utils.R;
import com.bxait.toymail.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/*
@description:
@ClassName WmsFeignService
@author Chen
@create 2023-05-13 16:11
@Version 1.0
*/
@FeignClient("toymail-ware")
public interface WmsFeignService {
    /*
     * @param skuIds
     * @==============History===============<br/>
     * @Description //   查询当前商品的库存情况
     * @Date 2023/5/13 2023/5/13
     * @Author < a href="2277411582@qq.com">chen</ a>
     * @return com.bxait.com.utils.R
     */
    @PostMapping("/ware/waresku/hasStock")
    R getSkusHasStock(@RequestBody List<Long> skuIds);


    /*
     * @param addrId   收获地址的id
     * @==============History===============<br/>
     * @Description //   获取收货地址信息
     * @Date 2023/5/13 2023/5/13
     * @Author < a href="2277411582@qq.com">chen</ a>
     * @return com.bxait.com.utils.R
     */
    @GetMapping("/ware/wareinfo/fare")
    R getFare(@RequestParam("addrId") Long addrId);

    /*
     * @param vo
     * @==============History===============<br/>
     * @Description //   锁定库存
     * @Date 2023/5/13 2023/5/13
     * @Author < a href="2277411582@qq.com">chen</ a>
     * @return com.bxait.com.utils.R
     */
    @PostMapping("/ware/waresku/lock/order")
    R orderLockStock(@RequestBody WareSkuLockVo vo);
}
